<template>
	<view class="el">
		<view class="navTitle">
			<text class="icon">&#59230;</text>约克自营
		</view>
		
		<view class="actInfo">
			<view class="view1">
				<image :src="list.img" mode=""></image>
			</view>
			<view class="view2">
				<text>{{list.actName}}</text><br>
				<text>购买价格 : <text class="price">{{list.price}}X{{list.number}}</text></text>
			</view>
		</view>
		
		<view class="actInfo1">
			<text>应支付总价 : </text><text class="price">￥{{list.price*list.number}}</text>
		</view>
		<view class="actInfo2">
			<view class="first">
				<text>选择支付方式</text>
			</view>
			<hr>
			<view class="" @tap="choose(0)">
				<text >余额支付</text>
				<text class="icon" v-if="choosePay == 0">&#59565;</text>
			</view>
			<hr>
			<view class="" @tap="choose(1)">
				<text>支付宝支付</text>
				<text class="icon" v-if="choosePay == 1">&#59565;</text>
			</view>
		</view>
		
		
		
		<view class="shopping">
			<view class="shopping1" @click="goCall">
				<text >立即支付</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:'',
				choosePay:'1'
			}
		},
		onLoad() {
			var _this = this;
			uni.getStorage({
				key:'list',
				success(res) {
					console.log(res.data);
				}
			})
			_this.list=uni.getStorageSync("activeList");
			
			console.log(this.list);
		},
		methods: {
			choose(obj){
				this.choosePay = obj;
			},
			goCall(){
				// 支付接口
				
			}
		}
	}
</script>

<style lang="scss">
	.el{
		width: 100%;
		background-color: #Dcdddd;
		height: 160vw;
		font-size: 15px;
		view{
			background-color: white;
		}
		
		.navTitle{
			padding: 25rpx;
		}
		
		.actInfo{
			margin-top: 2rpx;
			height: 130px;
			
			image{
				width: 100px;
				height:100px;
			}
			.view1{
				float: left;
				width: 35%;
				padding: 25rpx;
			}
			.view2{
				float: left;
				width: 50%;
				padding: 25rpx;
				text{
					padding-top: 10px;
					line-height: 40px;
				}
			}
		}
	}
	
	.actInfo1{
		margin-top: 10rpx;
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
	}
	.actInfo2{
		margin-top: 10rpx;
		padding: 0 20rpx;
		.first{
			padding-left: 0;
		}
		view{
			padding: 20rpx 0 20rpx 20rpx;
			display: flex;
			justify-content: space-between;
		}
	}
	
	.price{
		color: #ffaa00;
	}
	.icon{
		color: #ffaa00;
		margin-right: 25rpx;
	}
	
	
	.shopping{
		position: fixed;
		width: 100%;
		height: 90rpx;
		background-color: rgb(240,240,240);
		bottom: 0rpx;
		.shopping1{
			width: 90%;
			height: 60rpx;
			margin: auto;
			margin-top: 15rpx;
			line-height:60rpx ;
			text-align: center;
			background-color: #946666;
			text{
				font-size: 27rpx;
			}
		}
	}
</style>
